<template>
  <van-nav-bar title="充值记录" left-text="" left-arrow @click-left="goBack" />
  <div class="out">
    <div class="item" v-for="item in info">
      <div class="text">{{item.content}}</div>
      <div class="time">{{item.createtime}}</div>
    </div>
  </div>
</template>

<script setup>
const { proxy } = getCurrentInstance()
const goBack = () => { proxy.$router.push('/business/index') }
const LoginUser = reactive(proxy.$cookies.get("LoginUser"))
const info =ref([])


onBeforeMount(() => {
  getRecordData()
})
const getRecordData = async () => {
  let result = await Api.RechargeRecord({busid: LoginUser.id})
  if (result.code == 1) {
    info.value=result.data
    console.log(info.value);
  }
}
</script scoped>

<style>
.out{
  width: 100%;
  height: 95vh;
  display: flex;
  flex-direction: column;
}
.item{
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid #c1c1c1;
}
.item .text{
  width: 60%;
  font-size: 0.9rem;
}
.item .time{
  width: 30%;
  font-size: 0.8rem;
  color: #919090;
}
.item div{
  width: 100%;
  text-align: left;
}
</style>